Page({
  data: {

  },

  points:function(e) {
    var that = this
    wx.request({
      url: 'http://api.heclouds.com/devices/1172739999/datapoints?', //这里填写设备id
      header:{
        "api-key":"f=P6jBkiqXMFDdgYn7wtl06yM6w="  //这里写api-key
      },
      data:{
        limit:40
        
      },
      method :"GET",
      success:function(res){
       that.setData({
         weigh1:res.data.data.datastreams[0].datapoints[0].value,//获取数据
         weigh2:res.data.data.datastreams[1].datapoints[0].value,
       })
      }
    })
  }
})
